home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / libs / db / db-1.85 / db-1 / db.1.85.4 / PORT / linux / Makefile next >
Encoding:
Makefile  |  1996-03-10  |  6.5 KB  |  203 lines

  1. #    @(#)Makefile    8.9 (Berkeley) 7/14/94
  2.  
  3. prefix = /root/usr
  4. libdir = ${prefix}/lib
  5. includedir = ${prefix}/include
  6.  
  7. INSTALL = install -c
  8. LN    = ln -s
  9.  
  10. LIBNAME        = libdb
  11. MAJ_VERSION     = 1
  12. MIN_VERSION     = 85
  13. TINY_VERSION     = 4
  14. VERSION     = ${MAJ_VERSION}.${MIN_VERSION}.${TINY_VERSION}
  15.  
  16. LIBDB    = ${LIBNAME}.a
  17. SHLIBDB    = ${LIBNAME}.so.${VERSION}
  18. SONAME    = ${LIBNAME}.so.${MAJ_VERSION}
  19.  
  20. OBJ1=    hash.o hash_bigkey.o hash_buf.o \
  21.     hash_func.o hash_log2.o hash_page.o \
  22.     hsearch.o ndbm.o
  23. OBJ2=    bt_close.o bt_conv.o bt_debug.o \
  24.     bt_delete.o bt_get.o bt_open.o \
  25.     bt_overflow.o bt_page.o bt_put.o \
  26.     bt_search.o bt_seq.o bt_split.o bt_utils.o
  27. OBJ3=    db.o
  28. OBJ4=    mpool.o
  29. OBJ5=    rec_close.o rec_delete.o rec_get.o \
  30.     rec_open.o rec_put.o rec_search.o \
  31.     rec_seq.o rec_utils.o
  32. MISC=    snprintf.o
  33.  
  34. OBJS=    ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
  35.  
  36. all: ${LIBDB} ${SHLIBDB}
  37.  
  38. ${LIBDB}: ${OBJS}
  39.     rm -f $@
  40.     ar cq $@ static/*.o
  41.     ranlib $@
  42.  
  43. ${SHLIBDB}: ${OBJS}
  44.     rm -f $@
  45.     gcc -shared -Wl,-soname,${SONAME} shared/*.o -o $@
  46.  
  47. install:
  48.     -mkdir ${libdir}
  49.     -mkdir ${includedir}
  50.     ${INSTALL} -m 644 ${LIBDB} ${libdir}/${LIBDB}
  51.     ${INSTALL} -m 755 ${SHLIBDB} ${libdir}/${SHLIBDB}
  52.     ${LN} ${libdir}/${SHLIBDB} ${libdir}/${SONAME}
  53.     ${LN} ${libdir}/${SHLIBDB} ${libdir}/${LIBNAME}.so
  54.     ${INSTALL} -m 644 include/mpool.h ${includedir}/mpool.h
  55.     ${INSTALL} -m 644 include/db.h ${includedir}/db.h
  56.     
  57. clean:
  58.     rm -f ${LIBDB} ${SHLIBDB}
  59.     rm -f static/* shared/*
  60.  
  61. OORG=    -O6 -m486 -fomit-frame-pointer
  62. CL=    ${CC} -c -D__DBINTERFACE_PRIVATE ${OORG} -I. -Iinclude
  63. CS=    ${CC} -fPIC -c -D__DBINTERFACE_PRIVATE ${OORG} -I. -Iinclude
  64.  
  65. hash.o: ../../hash/hash.c
  66.     ${CL} -I../../hash ../../hash/hash.c -o static/$@
  67.     ${CS} -I../../hash ../../hash/hash.c -o shared/$@
  68.     
  69. hash_bigkey.o: ../../hash/hash_bigkey.c
  70.     ${CL} -I../../hash ../../hash/hash_bigkey.c -o static/$@
  71.     ${CS} -I../../hash ../../hash/hash_bigkey.c -o shared/$@
  72.  
  73. hash_buf.o: ../../hash/hash_buf.c
  74.     ${CL} -I../../hash ../../hash/hash_buf.c -o static/$@
  75.     ${CS} -I../../hash ../../hash/hash_buf.c -o shared/$@
  76.  
  77. hash_func.o: ../../hash/hash_func.c
  78.     ${CL} -I../../hash ../../hash/hash_func.c -o static/$@
  79.     ${CS} -I../../hash ../../hash/hash_func.c -o shared/$@
  80.  
  81. hash_log2.o: ../../hash/hash_log2.c
  82.     ${CL} -I../../hash ../../hash/hash_log2.c -o static/$@
  83.     ${CS} -I../../hash ../../hash/hash_log2.c -o shared/$@
  84.  
  85. hash_page.o: ../../hash/hash_page.c
  86.     ${CL} -I../../hash ../../hash/hash_page.c -o static/$@
  87.     ${CS} -I../../hash ../../hash/hash_page.c -o shared/$@
  88.  
  89. hsearch.o: ../../hash/hsearch.c
  90.     ${CL} -I../../hash ../../hash/hsearch.c -o static/$@
  91.     ${CS} -I../../hash ../../hash/hsearch.c -o shared/$@
  92.  
  93. ndbm.o: ../../hash/ndbm.c
  94.     ${CL} -I../../hash ../../hash/ndbm.c -o static/$@
  95.     ${CS} -I../../hash ../../hash/ndbm.c -o shared/$@
  96.  
  97. bt_close.o: ../../btree/bt_close.c
  98.     ${CL} -I../../btree ../../btree/bt_close.c -o static/$@
  99.     ${CS} -I../../btree ../../btree/bt_close.c -o shared/$@
  100.  
  101. bt_conv.o: ../../btree/bt_conv.c
  102.     ${CL} -I../../btree ../../btree/bt_conv.c -o static/$@
  103.     ${CS} -I../../btree ../../btree/bt_conv.c -o shared/$@
  104.  
  105. bt_debug.o: ../../btree/bt_debug.c
  106.     ${CL} -I../../btree ../../btree/bt_debug.c -o static/$@
  107.     ${CS} -I../../btree ../../btree/bt_debug.c -o shared/$@
  108.  
  109. bt_delete.o: ../../btree/bt_delete.c
  110.     ${CL} -I../../btree ../../btree/bt_delete.c -o static/$@
  111.     ${CS} -I../../btree ../../btree/bt_delete.c -o shared/$@
  112.  
  113. bt_get.o: ../../btree/bt_get.c
  114.     ${CL} -I../../btree ../../btree/bt_get.c -o static/$@
  115.     ${CS} -I../../btree ../../btree/bt_get.c -o shared/$@
  116.  
  117. bt_open.o: ../../btree/bt_open.c
  118.     ${CL} -I../../btree ../../btree/bt_open.c -o static/$@
  119.     ${CS} -I../../btree ../../btree/bt_open.c -o shared/$@
  120.  
  121. bt_overflow.o: ../../btree/bt_overflow.c
  122.     ${CL} -I../../btree ../../btree/bt_overflow.c -o static/$@
  123.     ${CS} -I../../btree ../../btree/bt_overflow.c -o shared/$@
  124.  
  125. bt_page.o: ../../btree/bt_page.c
  126.     ${CL} -I../../btree ../../btree/bt_page.c -o static/$@
  127.     ${CS} -I../../btree ../../btree/bt_page.c -o shared/$@
  128.  
  129. bt_put.o: ../../btree/bt_put.c
  130.     ${CL} -I../../btree ../../btree/bt_put.c -o static/$@
  131.     ${CS} -I../../btree ../../btree/bt_put.c -o shared/$@
  132.  
  133. bt_search.o: ../../btree/bt_search.c
  134.     ${CL} -I../../btree ../../btree/bt_search.c -o static/$@
  135.     ${CS} -I../../btree ../../btree/bt_search.c -o shared/$@
  136.  
  137. bt_seq.o: ../../btree/bt_seq.c
  138.     ${CL} -I../../btree ../../btree/bt_seq.c -o static/$@
  139.     ${CS} -I../../btree ../../btree/bt_seq.c -o shared/$@
  140.  
  141. bt_split.o: ../../btree/bt_split.c
  142.     ${CL} -I../../btree ../../btree/bt_split.c -o static/$@
  143.     ${CS} -I../../btree ../../btree/bt_split.c -o shared/$@
  144.  
  145. bt_stack.o: ../../btree/bt_stack.c
  146.     ${CL} -I../../btree ../../btree/bt_stack.c -o static/$@
  147.     ${CS} -I../../btree ../../btree/bt_stack.c -o shared/$@
  148.  
  149. bt_utils.o: ../../btree/bt_utils.c
  150.     ${CL} -I../../btree ../../btree/bt_utils.c -o static/$@
  151.     ${CS} -I../../btree ../../btree/bt_utils.c -o shared/$@
  152.  
  153. db.o: ../../db/db.c
  154.     ${CL} ../../db/db.c -o static/$@
  155.     ${CS} ../../db/db.c -o shared/$@
  156.  
  157. mpool.o: ../../mpool/mpool.c
  158.     ${CL} -I../../mpool ../../mpool/mpool.c -o static/$@
  159.     ${CS} -I../../mpool ../../mpool/mpool.c -o shared/$@
  160.  
  161. rec_close.o: ../../recno/rec_close.c
  162.     ${CL} -I../../recno ../../recno/rec_close.c -o static/$@
  163.     ${CS} -I../../recno ../../recno/rec_close.c -o shared/$@
  164.  
  165. rec_delete.o: ../../recno/rec_delete.c
  166.     ${CL} -I../../recno ../../recno/rec_delete.c -o static/$@
  167.     ${CS} -I../../recno ../../recno/rec_delete.c -o shared/$@
  168.  
  169. rec_get.o: ../../recno/rec_get.c
  170.     ${CL} -I../../recno ../../recno/rec_get.c -o static/$@
  171.     ${CS} -I../../recno ../../recno/rec_get.c -o shared/$@
  172.  
  173. rec_open.o: ../../recno/rec_open.c
  174.     ${CL} -I../../recno ../../recno/rec_open.c -o static/$@
  175.     ${CS} -I../../recno ../../recno/rec_open.c -o shared/$@
  176.  
  177. rec_put.o: ../../recno/rec_put.c
  178.     ${CL} -I../../recno ../../recno/rec_put.c -o static/$@
  179.     ${CS} -I../../recno ../../recno/rec_put.c -o shared/$@
  180.  
  181. rec_search.o: ../../recno/rec_search.c
  182.     ${CL} -I../../recno ../../recno/rec_search.c -o static/$@
  183.     ${CS} -I../../recno ../../recno/rec_search.c -o shared/$@
  184.  
  185. rec_seq.o: ../../recno/rec_seq.c
  186.     ${CL} -I../../recno ../../recno/rec_seq.c -o static/$@
  187.     ${CS} -I../../recno ../../recno/rec_seq.c -o shared/$@
  188.  
  189. rec_utils.o: ../../recno/rec_utils.c
  190.     ${CL} -I../../recno ../../recno/rec_utils.c -o static/$@
  191.     ${CS} -I../../recno ../../recno/rec_utils.c -o shared/$@
  192.  
  193. memmove.o:
  194.     ${CC} -DMEMMOVE -c -O -I. -Iinclude clib/memmove.c -o static/$@
  195.     ${CC} -fPIC -DMEMMOVE -c -O -I. -Iinclude clib/memmove.c -o shared/$@
  196. mktemp.o:
  197.     ${CC} -c -O -I. -Iinclude clib/mktemp.c -o static/$@
  198.     ${CC} -fPIC -c -O -I. -Iinclude clib/mktemp.c -o shared$@
  199.  
  200. snprintf.o:
  201.     ${CC} -c -O -I. -Iinclude clib/snprintf.c -o static/$@
  202.     ${CC} -fPIC -c -O -I. -Iinclude clib/snprintf.c -o shared/$@
  203.